﻿using System;
using System.Collections.Generic;
using System.Text;
using yb.commerce.DAL;
using yb.commerce.Model;

namespace yb.commerce.BLL
{
    public class MemberBusiness
    {
        public bool Add(Member member)
        {
            return new MemberDAO().Add(member);
        }

        public bool Delete(int Id)
        {
            return new MemberDAO().Delete(Id);
        }

        public bool Update(Member member)
        {
            return new MemberDAO().Update(member);
        }
        public bool UpdateIntegral(Member member)
        {
            return new MemberDAO().UpdateIntegral(member);
        }
        public bool UpdateState(Member member)
        {
            return new MemberDAO().UpdateState(member);
        }
        public bool UpdatePassword(Member member)
        {
            return new MemberDAO().UpdatePassword(member);
        }
        public bool Validate(Member member)
        {
            return new MemberDAO().Validate(member);
        }
        public bool IsSameUserName(string userName)
        {
            return new MemberDAO().IsSameUserName(userName);
        }

        public Member GetEntity(int Id)
        {
            return new MemberDAO().GetEntity(Id);
        }
        public Member GetEntityByUserName(string userName)
        {
            return new MemberDAO().GetEntityByUserName(userName);
        }

        public DataRecordTable GetList(string fieldList, string orderField, bool orderBy, int pageIndex, int pageSize, string where)
        {
            return new MemberDAO().GetList(fieldList,orderField,orderBy,pageIndex,pageSize,where);
        }
        public bool IsSameEmail(string email)
        {
            return new MemberDAO().IsSameEmail(email);
        }
        
    }
}
